/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufba.lasid.v1.jitclouds.mda.datatypes.enums;

/**
 *
 * @author aliriosa
 */
public enum ContextKind{
    UnknownContext         (0),
    CloudFederationContext (1),
    CloudContext           (2), 
    DCContext              (3), 
    ClusterContext         (4), 
    NodeContext            (5), 
    HypervisorContext      (6), 
    VMContext              (7);

    private final long contextTypeID;

    ContextKind(long contextTypeID){

        this.contextTypeID = contextTypeID;

    }//end Constructor Context Kind

    public long getContextKindID(){
        return this.contextTypeID;
    }

    public ContextKind getSub(){

        switch(this){                
            case CloudFederationContext: return CloudContext;                    
            case CloudContext          : return DCContext;                    
            case DCContext             : return ClusterContext;
            case ClusterContext        : return NodeContext;
            case NodeContext           : return HypervisorContext;
            case HypervisorContext     : return VMContext;
        }            

        return null;

    }//end Get Sub Context Kind

    public ContextKind getSuper(){

        switch(this){                
            case CloudContext          : return CloudFederationContext;
            case DCContext             : return CloudContext;
            case ClusterContext        : return DCContext;
            case NodeContext           : return ClusterContext;
            case HypervisorContext     : return NodeContext;
            case VMContext : return HypervisorContext;
        }            

        return null;

    }//end Get Super Context Kind

}//end enum Context Kind
